﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MubiSDK.DataConvertLib
{
    /// <summary>
    /// 操作结果类
    /// </summary>
    public class OperateResult
    {
        #region 属性
        /// <summary>
        /// 操作结果
        /// </summary>
        public bool IsSuccess { get; set; } = false;
        /// <summary>
        /// 错误码
        /// </summary>
        public int ErrorCode { get; set; } = 99999;
        /// <summary>
        /// 错误描述
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;
        #endregion

        #region 构造方法
        /// <summary>
        /// 构造方法
        /// </summary>
        public OperateResult() { }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        public OperateResult(bool isSuccess)
        {
            this.IsSuccess = isSuccess;
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(string errorMessage)
        {
            this.ErrorMessage = errorMessage;
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, string errorMessage)
        {
            this.IsSuccess = isSuccess;
            this.ErrorMessage = errorMessage;
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(int errorCode, string errorMessage)
        {
            this.ErrorCode = errorCode;
            this.ErrorMessage = errorMessage;
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage)
        {
            this.IsSuccess = isSuccess;
            this.ErrorCode = errorCode;
            this.ErrorMessage = errorMessage;
        }
        #endregion

        #region 工厂方法
        /// <summary>
        /// 创建不带数据的操作成功结果
        /// </summary>
        /// <returns>不带数据的结果对象</returns>
        public static OperateResult CreateSuccessResult()
        {
            return new OperateResult()
            {
                IsSuccess = true,
                ErrorCode = 0,
                ErrorMessage = "Success"
            };
        }
        /// <summary>
        /// 创建不带数据的操作失败结果，不含错误描述
        /// </summary>
        /// <returns>不带数据、不含错误描述的结果对象</returns>
        public static OperateResult CreateFailResult()
        {
            return new OperateResult()
            {
                IsSuccess = false,
                ErrorCode = 99999,
                ErrorMessage = string.Empty
            };
        }
        /// <summary>
        /// 创建不带数据的操作失败结果，含错误描述
        /// </summary>
        /// <param name="errorMessage">错误描述</param>
        /// <returns></returns>
        public static OperateResult CreateFailResult(string errorMessage)
        {
            return new OperateResult()
            {
                IsSuccess = false,
                ErrorCode = 99999,
                ErrorMessage = errorMessage
            };
        }


        /// <summary>
        /// 创建带一份数据的操作成功结果
        /// </summary>
        /// <typeparam name="T">数据类型</typeparam>
        /// <param name="data">数据</param>
        /// <returns>带一份数据的结果对象</returns>
        public static OperateResult<T> CreateSuccessResult<T>(T data)
        {
            return new OperateResult<T>()
            {
                IsSuccess = true,
                ErrorCode = 0,
                ErrorMessage = "Success",
                Data = data
            };
        }
        /// <summary>
        /// 创建带一份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T">数据类型</typeparam>
        /// <param name="message">错误描述</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T> CreateFailResult<T>(string message)
        {
            return new OperateResult<T>()
            {
                IsSuccess = false,
                ErrorCode = 99999,
                ErrorMessage = message
            };
        }
        /// <summary>
        /// 创建带一份数据的操作成功结果
        /// </summary>
        /// <typeparam name="T">数据类型</typeparam>
        /// <param name="result">结果对象</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T> CreateFailResult<T>(OperateResult result)
        {
            return new OperateResult<T>()
            {
                IsSuccess = false,
                ErrorCode = result.ErrorCode,
                ErrorMessage = result.ErrorMessage
            };
        }


        /// <summary>
        /// 创建带二份数据的操作成功结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        /// <returns>带二份数据的结果对象</returns>
        public static OperateResult<T1, T2> CreateSuccessResult<T1, T2>(T1 data1, T2 data2)
        {
            return new OperateResult<T1, T2>()
            {
                IsSuccess = true,
                ErrorCode = 0,
                ErrorMessage = "Success",
                Data1 = data1,
                Data2 = data2
            };
        }
        /// <summary>
        /// 创建带二份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <param name="message">错误描述</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2> CreateFailResult<T1, T2>(string message)
        {
            return new OperateResult<T1, T2>()
            {
                IsSuccess = false,
                ErrorCode = 99999,
                ErrorMessage = message
            };
        }
        /// <summary>
        /// 创建带二份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <param name="result">结果对象</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2> CreateFailResult<T1, T2>(OperateResult result)
        {
            return new OperateResult<T1, T2>()
            {
                IsSuccess = false,
                ErrorCode = result.ErrorCode,
                ErrorMessage = result.ErrorMessage
            };
        }


        /// <summary>
        /// 创建带三份数据的操作成功结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        /// <param name="data3">数据3</param>
        /// <returns>带三份数据的结果对象</returns>
        public static OperateResult<T1, T2, T3> CreateSuccessResult<T1, T2, T3>(T1 data1, T2 data2, T3 data3)
        {
            return new OperateResult<T1, T2, T3>()
            {
                IsSuccess = true,
                ErrorCode = 0,
                ErrorMessage = "Success",
                Data1 = data1,
                Data2 = data2,
                Data3 = data3
            };
        }
        /// <summary>
        /// 创建带三份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <param name="message">错误描述</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2, T3> CreateFailResult<T1, T2, T3>(string message)
        {
            return new OperateResult<T1, T2, T3>()
            {
                IsSuccess = false,
                ErrorCode = 99999,
                ErrorMessage = message
            };
        }
        /// <summary>
        /// 创建带三份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <param name="result">结果对象</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2, T3> CreateFailResult<T1, T2, T3>(OperateResult result)
        {
            return new OperateResult<T1, T2, T3>()
            {
                IsSuccess = false,
                ErrorCode = result.ErrorCode,
                ErrorMessage = result.ErrorMessage
            };
        }


        /// <summary>
        /// 创建带四份数据的操作成功结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <typeparam name="T4">数据类型4</typeparam>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        /// <param name="data3">数据3</param>
        /// <param name="data4">数据4</param>
        /// <returns>带四份数据的结果对象</returns>
        public static OperateResult<T1, T2, T3, T4> CreateSuccessResult<T1, T2, T3, T4>(T1 data1, T2 data2, T3 data3, T4 data4)
        {
            return new OperateResult<T1, T2, T3, T4>()
            {
                IsSuccess = true,
                ErrorCode = 0,
                ErrorMessage = "Success",
                Data1 = data1,
                Data2 = data2,
                Data3 = data3,
                Data4 = data4
            };
        }
        /// <summary>
        /// 创建带四份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <typeparam name="T4">数据类型4</typeparam>
        /// <param name="message">错误描述</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2, T3, T4> CreateFailResult<T1, T2, T3, T4>(string message)
        {
            return new OperateResult<T1, T2, T3, T4>()
            {
                IsSuccess = false,
                ErrorCode = 99999,
                ErrorMessage = message
            };
        }
        /// <summary>
        /// 创建带四份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <typeparam name="T4">数据类型4</typeparam>
        /// <param name="result">结果对象</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2, T3, T4> CreateFailResult<T1, T2, T3, T4>(OperateResult result)
        {
            return new OperateResult<T1, T2, T3, T4>()
            {
                IsSuccess = false,
                ErrorCode = result.ErrorCode,
                ErrorMessage = result.ErrorMessage
            };
        }


        /// <summary>
        /// 创建带五份数据的操作成功结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <typeparam name="T4">数据类型4</typeparam>
        /// <typeparam name="T5">数据类型5</typeparam>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        /// <param name="data3">数据3</param>
        /// <param name="data4">数据4</param>
        /// <param name="data5">数据5</param>
        /// <returns>带五份数据的结果对象</returns>
        public static OperateResult<T1, T2, T3, T4, T5> CreateSuccessResult<T1, T2, T3, T4, T5>(T1 data1, T2 data2, T3 data3, T4 data4, T5 data5)
        {
            return new OperateResult<T1, T2, T3, T4, T5>()
            {
                IsSuccess = true,
                ErrorCode = 0,
                ErrorMessage = "Success",
                Data1 = data1,
                Data2 = data2,
                Data3 = data3,
                Data4 = data4,
                Data5 = data5
            };
        }
        /// <summary>
        /// 创建带五份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <typeparam name="T4">数据类型4</typeparam>
        /// <typeparam name="T5">数据类型5</typeparam>
        /// <param name="message">错误描述</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2, T3, T4, T5> CreateFailResult<T1, T2, T3, T4, T5>(string message)
        {
            return new OperateResult<T1, T2, T3, T4, T5>()
            {
                IsSuccess = false,
                ErrorCode = 99999,
                ErrorMessage = message
            };
        }
        /// <summary>
        /// 创建带五份数据的操作失败结果
        /// </summary>
        /// <typeparam name="T1">数据类型1</typeparam>
        /// <typeparam name="T2">数据类型2</typeparam>
        /// <typeparam name="T3">数据类型3</typeparam>
        /// <typeparam name="T4">数据类型4</typeparam>
        /// <typeparam name="T5">数据类型5</typeparam>
        /// <param name="result">结果对象</param>
        /// <returns>不含数据、含错误描述的结果对象</returns>
        public static OperateResult<T1, T2, T3, T4, T5> CreateFailResult<T1, T2, T3, T4, T5>(OperateResult result)
        {
            return new OperateResult<T1, T2, T3, T4, T5>()
            {
                IsSuccess = false,
                ErrorCode = result.ErrorCode,
                ErrorMessage = result.ErrorMessage
            };
        }
        #endregion
    }
    /// <summary>
    /// 带一个数据的操作结果类
    /// </summary>
    /// <typeparam name="T">数据类型</typeparam>
    public class OperateResult<T> : OperateResult
    {
        #region 属性
        /// <summary>
        /// 数据
        /// </summary>
        public T Data { get; set; } = default;
        #endregion

        #region 构造方法
        /// <summary>
        /// 构造方法
        /// </summary>
        public OperateResult() : base() 
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        public OperateResult(bool isSuccess) : base(isSuccess)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(string errorMessage) : base(errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, string errorMessage) : base(isSuccess, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(int errorCode, string errorMessage) : base(errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage) : base(isSuccess, errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        /// <param name="data">数据</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage, T data) : base(isSuccess, errorCode, errorMessage)
        {
            this.Data = data;
        }
        #endregion
    }
    /// <summary>
    /// 带二个数据的操作结果类
    /// </summary>
    /// <typeparam name="T1">数据类型1</typeparam>
    /// <typeparam name="T2">数据类型2</typeparam>
    public class OperateResult<T1, T2> : OperateResult
    {
        #region 属性
        /// <summary>
        /// 数据1
        /// </summary>
        public T1 Data1 { get; set; } = default;

        /// <summary>
        /// 数据2
        /// </summary>
        public T2 Data2 { get; set; } = default;
        #endregion

        #region 构造方法
        /// <summary>
        /// 构造方法
        /// </summary>
        public OperateResult() : base()
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        public OperateResult(bool isSuccess) : base(isSuccess)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(string errorMessage) : base(errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, string errorMessage) : base(isSuccess, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(int errorCode, string errorMessage) : base(errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage) : base(isSuccess, errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage, T1 data1, T2 data2) : base(isSuccess, errorCode, errorMessage)
        {
            this.Data1 = data1;
            this.Data2 = data2;
        }
        #endregion
    }
    /// <summary>
    /// 带三个数据的操作结果类
    /// </summary>
    /// <typeparam name="T1">数据类型1</typeparam>
    /// <typeparam name="T2">数据类型2</typeparam>
    /// <typeparam name="T3">数据类型3</typeparam>
    public class OperateResult<T1, T2, T3> : OperateResult
    {
        #region 属性
        /// <summary>
        /// 数据1
        /// </summary>
        public T1 Data1 { get; set; } = default;

        /// <summary>
        /// 数据2
        /// </summary>
        public T2 Data2 { get; set; } = default;

        /// <summary>
        /// 数据3
        /// </summary>
        public T3 Data3 { get; set; } = default;
        #endregion

        #region 构造方法
        /// <summary>
        /// 构造方法
        /// </summary>
        public OperateResult() : base()
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        public OperateResult(bool isSuccess) : base(isSuccess)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(string errorMessage) : base(errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, string errorMessage) : base(isSuccess, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(int errorCode, string errorMessage) : base(errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage) : base(isSuccess, errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        /// <param name="data3">数据3</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage, T1 data1, T2 data2, T3 data3) : base(isSuccess, errorCode, errorMessage)
        {
            this.Data1 = data1;
            this.Data2 = data2;
            this.Data3 = data3;
        }
        #endregion
    }
    /// <summary>
    /// 带四个数据的操作结果类
    /// </summary>
    /// <typeparam name="T1">数据类型1</typeparam>
    /// <typeparam name="T2">数据类型2</typeparam>
    /// <typeparam name="T3">数据类型3</typeparam>
    /// <typeparam name="T4">数据类型4</typeparam>
    public class OperateResult<T1, T2, T3, T4> : OperateResult
    {
        #region 属性
        /// <summary>
        /// 数据1
        /// </summary>
        public T1 Data1 { get; set; } = default;

        /// <summary>
        /// 数据2
        /// </summary>
        public T2 Data2 { get; set; } = default;

        /// <summary>
        /// 数据3
        /// </summary>
        public T3 Data3 { get; set; } = default;

        /// <summary>
        /// 数据4
        /// </summary>
        public T4 Data4 { get; set; } = default;
        #endregion

        #region 构造方法
        /// <summary>
        /// 构造方法
        /// </summary>
        public OperateResult() : base()
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        public OperateResult(bool isSuccess) : base(isSuccess)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(string errorMessage) : base(errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, string errorMessage) : base(isSuccess, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(int errorCode, string errorMessage) : base(errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage) : base(isSuccess, errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        /// <param name="data3">数据3</param>
        /// <param name="data4">数据4</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage, T1 data1, T2 data2, T3 data3, T4 data4) : base(isSuccess, errorCode, errorMessage)
        {
            this.Data1 = data1;
            this.Data2 = data2;
            this.Data3 = data3;
            this.Data4 = data4;
        }
        #endregion
    }
    /// <summary>
    /// 带五个数据的操作结果类
    /// </summary>
    /// <typeparam name="T1">数据类型1</typeparam>
    /// <typeparam name="T2">数据类型2</typeparam>
    /// <typeparam name="T3">数据类型3</typeparam>
    /// <typeparam name="T4">数据类型4</typeparam>
    /// <typeparam name="T5">数据类型5</typeparam>
    public class OperateResult<T1, T2, T3, T4, T5> : OperateResult
    {
        #region 属性
        /// <summary>
        /// 数据1
        /// </summary>
        public T1 Data1 { get; set; } = default;

        /// <summary>
        /// 数据2
        /// </summary>
        public T2 Data2 { get; set; } = default;

        /// <summary>
        /// 数据3
        /// </summary>
        public T3 Data3 { get; set; } = default;

        /// <summary>
        /// 数据4
        /// </summary>
        public T4 Data4 { get; set; } = default;

        /// <summary>
        /// 数据5
        /// </summary>
        public T5 Data5 { get; set;} = default;
        #endregion

        #region 构造方法
        /// <summary>
        /// 构造方法
        /// </summary>
        public OperateResult() : base()
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        public OperateResult(bool isSuccess) : base(isSuccess)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(string errorMessage) : base(errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, string errorMessage) : base(isSuccess, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(int errorCode, string errorMessage) : base(errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage) : base(isSuccess, errorCode, errorMessage)
        {
        }

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="isSuccess">操作结果</param>
        /// <param name="errorCode">错误码</param>
        /// <param name="errorMessage">错误描述</param>
        /// <param name="data1">数据1</param>
        /// <param name="data2">数据2</param>
        /// <param name="data3">数据3</param>
        /// <param name="data4">数据4</param>
        /// <param name="data5">数据5</param>
        public OperateResult(bool isSuccess, int errorCode, string errorMessage, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5) : base(isSuccess, errorCode, errorMessage)
        {
            this.Data1 = data1;
            this.Data2 = data2;
            this.Data3 = data3;
            this.Data4 = data4;
            this.Data5 = data5;
        }
        #endregion
    }
}
